package com.xiaoyung.easyisapisdk.common.file.domain;

import java.util.Date;

//import io.swagger.annotations.ApiModelProperty;

/**
 * 文件信息对象 file_info
 */
public class FileInfo {
    
    /** id */
    //@TableId(type=IdType.ASSIGN_ID)
    //@ApiModelProperty("id")
    private String id;

    /** 存储路径 */
    //@ApiModelProperty("存储路径")
    private String storageKey;

    /** 源文件名 */
    //@ApiModelProperty("源文件名")
    private String originalName;

    /** contentType */
    //@ApiModelProperty("contentType")
    private String contentType;

    /** 文件大小 */
    //@ApiModelProperty("文件大小")
    private Long size;

    /** md5值 */
    //@ApiModelProperty("md5值")
    private String md5;

    /** 存储类型(oss,minio,file,fdfs) */
    //@ApiModelProperty("存储类型")
    private String storageType;
    
    public static final String STORAGE_TYPE_OSS="oss";
    public static final String STORAGE_TYPE_MINIO="minio";
    public static final String STORAGE_TYPE_FILE="file";
    public static final String STORAGE_TYPE_FDFS="fdfs";
    
    /** 生成url次数 */
    //@ApiModelProperty("生成url次数")
    private Integer generateUrlCount;

    //@ApiModelProperty("创建时间")
    private Date createTime;
    
    //@ApiModelProperty("创建时间")
    private String createBy;
    
    /** 应用id */
    //@ApiModelProperty("应用id")
    private String appId;
    
    
    private String url;//不需要获取访问令牌的文件直接返回url

  
    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }
   
    public String getStorageKey() {
		return storageKey;
	}

	public void setStorageKey(String storageKey) {
		this.storageKey = storageKey;
	}

	public void setOriginalName(String originalName) {
        this.originalName = originalName;
    }

    public String getOriginalName() {
        return originalName;
    }
    
    public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public void setSize(Long size) {
        this.size = size;
    }

    public Long getSize() {
        return size;
    }
    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getMd5() {
        return md5;
    }
    public void setStorageType(String storageType) {
        this.storageType = storageType;
    }

    public String getStorageType() {
        return storageType;
    }
    public void setGenerateUrlCount(Integer generateUrlCount) {
        this.generateUrlCount = generateUrlCount;
    }

    public Integer getGenerateUrlCount() {
        return generateUrlCount;
    }
    
    public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	//兼容旧的
	public String getName() {
		return this.storageKey;
	}
	
	public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppId() {
        return appId;
    }

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

    
}
